
from django.contrib import admin
from django.urls import path,re_path
from .views import *

# 设置应用程序命名空间
app_name = 'users'

urlpatterns = [
    path('index/', index,name = "index"),
    path('register/',RegisterView.as_view(), name = "register"),
    #正则类型
    re_path('usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/',UsernameCountView.as_view()),
    re_path(r'mobiles/(?P<mobile>1[3-9]\d{9})/count/',MoblieCountView.as_view()),
    path('login/', LoginView.as_view(),name = "login"),
    #等出
    path('logout/', LogoutView.as_view(),name = "logout"),
    #用户中心
    path('user_info/', UserInfoView.as_view(), name='user_info'),   #name的取名是有讲究的，要和html中测定义名字一致，不然取不到值
]
